/*
 * $Id: PolisRightTestCase.java 27 2007-04-13 01:02:48Z aaron.day $
 */
package org.crazydays.core.data;


import org.hibernate.HibernateException;

import junit.framework.TestCase;

import org.crazydays.hibernate.HibernateUtil;

/**
 * PolisRightTestCase
 */
public class PolisRightTestCase
	extends TestCase
{
	/**
	 * Test Admin.
	 */
	public void testAdmin()
	{
		try {
			PolisRight right = (PolisRight) HibernateUtil
					.loadPolisDataByName(PolisRight.class,
							"Admin");

			assertNotNull("user == null", right);
		} catch (HibernateException e) {
			fail("HibernateException: " + e.getMessage());
		}
	}

	/**
	 * Test execute.
	 */
	public void testExecute()
	{
		try {
			PolisRight right = (PolisRight) HibernateUtil
					.loadPolisDataByName(PolisRight.class,
							"Execute");

			assertNotNull("user == null", right);
		} catch (HibernateException e) {
			fail("HibernateException: " + e.getMessage());
		}
	}

	/**
	 * Test read.
	 */
	public void testRead()
	{
		try {
			PolisRight right = (PolisRight) HibernateUtil
					.loadPolisDataByName(PolisRight.class,
							"Read");

			assertNotNull("user == null", right);
		} catch (HibernateException e) {
			fail("HibernateException: " + e.getMessage());
		}
	}

	/**
	 * Test write.
	 */
	public void testWrite()
	{
		try {
			PolisRight right = (PolisRight) HibernateUtil
					.loadPolisDataByName(PolisRight.class,
							"Write");

			assertNotNull("user == null", right);
		} catch (HibernateException e) {
			fail("HibernateException: " + e.getMessage());
		}
	}
}
